<template>
	<div>
		<div class="flex justify_content_between align_items_center  content-wrapper p_lr_20 m_b_20">
			<div class="flex align_items_center">
				<h2>产品分类</h2>
				<div class="p_l_20">
					<el-button size="small" type="primary" @click="add">新建分类</el-button>
					<!-- <el-button size="small" type="primary" @click="add">链接设置</el-button> -->
				</div>
			</div>
			<div>
				<Language></Language>
			</div>
		</div>

		<div  class="content-wrapper p_20">
		<!-- -项目列表- -->
		<el-table :data='tableData' width='100%'>
			<el-table-column label='最后更新时间' prop='updated_at'>
				<template slot-scope="scope">
					{{scope.row.updated_at|format}}
				</template>
			</el-table-column>
			<el-table-column label='分类名' prop='name'></el-table-column>
			<el-table-column label='排序' prop='sort'></el-table-column>
			<el-table-column label='操作' width="260" prop='sort'>
				<template slot-scope="scope">
					<el-button size="small" @click="edit(scope.row)">编辑</el-button>
					<el-button size="small" @click="remove(scope.row)">删除</el-button>
				</template>
			</el-table-column>
		</el-table>
		<page ref="Page" :total="total"></page>
		<Edit ref="Edit"></Edit>
		</div>
	</div>
</template>
<script type="text/javascript">
	import methods from './method'
	import Edit from './edit/edit'

	export default {
		data() {
			return {
				tableData: [], //列表数据
				id:1,
			}
		},
		methods: methods,
		components:{
			Edit
		},
		mounted() {
			this.getTableData()
		}
	}
</script>
